import {Menu} from "./expressExt/Menu";
Menu.init(__dirname);

import {RpcServer} from "./expressExt/rpc/RpcServer";
import {rpc} from "./rpc/rpc";
import {TimeEvent} from "./expressExt/TimeEvent";
import {Mem} from "./rpc/Mem";
import {RpcConfig} from "./configExt/RpcConfig";


/**
 * 定时任务,每日凌晨3点内存回收
 */
TimeEvent.dailyEvent(3, 0, e => {
    Mem.removeOldMem();
}).start();

/**
 * 启动rpc服务
 */
RpcServer.serverStart(RpcConfig.rpcServer.portRpc, rpc);